<?php
function sysmsg($msg = '未知的异常',$die = true) {
?>
 <!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>站点提示信息</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="../favicon.ico" />
    <style type="text/css">
        *{box-sizing:border-box;margin:0;padding:0;font-family:Lantinghei SC,Open Sans,Arial,Hiragino Sans GB,Microsoft YaHei,"微软雅黑",STHeiti,WenQuanYi Micro Hei,SimSun,sans-serif;-webkit-font-smoothing:antialiased}
        body{padding:70px 0;background:#edf1f4;font-weight:400;font-size:1pc;-webkit-text-size-adjust:none;color:#333}
        a{outline:0;color:#3498db;text-decoration:none;cursor:pointer}
        .system-message{margin:20px 5%;padding:40px 20px;background:#fff;box-shadow:1px 1px 1px hsla(0,0%,39%,.1);text-align:center}
        .system-message h1{margin:0;margin-bottom:9pt;color:#444;font-weight:400;font-size:40px}
        .system-message .jump,.system-message .image{margin:20px 0;padding:0;padding:10px 0;font-weight:400}
        .system-message .jump{font-size:14px}
        .system-message .jump a{color:#333}
        .system-message p{font-size:9pt;line-height:20px}
        .system-message .btn{display:inline-block;margin-right:10px;width:138px;height:2pc;border:1px solid #44a0e8;border-radius:30px;color:#44a0e8;text-align:center;font-size:1pc;line-height:2pc;margin-bottom:5px;}
        .success .btn{border-color:#69bf4e;color:#69bf4e}
        .error .btn{border-color:#69bf4e;color:#69bf4e}
        .info .btn{border-color:#3498db;color:#3498db}
        .copyright p{width:100%;color:#919191;text-align:center;font-size:10px}
        .system-message .btn-grey{border-color:#bbb;color:#bbb}
        .clearfix:after{clear:both;display:block;visibility:hidden;height:0;content:"."}
        @media (max-width:768px){body {padding:20px 0;}}
        @media (max-width:480px){.system-message h1{font-size:30px;}}
    </style>
</head>
<body>
<div class="system-message error">
<div class="image">
<img src="http://<?php echo $_SERVER['HTTP_HOST']?>/assets/images/error.svg" alt="" width="150" />
</div>
<h2>站点提示信息</h2>
</br>
<?php echo $msg; ?>
</div>
<div class="copyright">
<p>Copyright © <?php echo date("Y");?><a href="">幻影二级域名分发系统</a></p>
</body>
</html>
<?php
    if ($die == true) {
        exit;
    }
}
function sysmsgs($msg = '未知的异常',$die = true) {
?>
 <!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>站点提示信息</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="../favicon.ico" />
    <style type="text/css">
        *{box-sizing:border-box;margin:0;padding:0;font-family:Lantinghei SC,Open Sans,Arial,Hiragino Sans GB,Microsoft YaHei,"微软雅黑",STHeiti,WenQuanYi Micro Hei,SimSun,sans-serif;-webkit-font-smoothing:antialiased}
        body{padding:70px 0;background:#edf1f4;font-weight:400;font-size:1pc;-webkit-text-size-adjust:none;color:#333}
        a{outline:0;color:#3498db;text-decoration:none;cursor:pointer}
        .system-message{margin:20px 5%;padding:40px 20px;background:#fff;box-shadow:1px 1px 1px hsla(0,0%,39%,.1);text-align:center}
        .system-message h1{margin:0;margin-bottom:9pt;color:#444;font-weight:400;font-size:40px}
        .system-message .jump,.system-message .image{margin:20px 0;padding:0;padding:10px 0;font-weight:400}
        .system-message .jump{font-size:14px}
        .system-message .jump a{color:#333}
        .system-message p{font-size:9pt;line-height:20px}
        .system-message .btn{display:inline-block;margin-right:10px;width:138px;height:2pc;border:1px solid #44a0e8;border-radius:30px;color:#44a0e8;text-align:center;font-size:1pc;line-height:2pc;margin-bottom:5px;}
        .success .btn{border-color:#69bf4e;color:#69bf4e}
        .error .btn{border-color:#69bf4e;color:#69bf4e}
        .info .btn{border-color:#3498db;color:#3498db}
        .copyright p{width:100%;color:#919191;text-align:center;font-size:10px}
        .system-message .btn-grey{border-color:#bbb;color:#bbb}
        .clearfix:after{clear:both;display:block;visibility:hidden;height:0;content:"."}
        @media (max-width:768px){body {padding:20px 0;}}
        @media (max-width:480px){.system-message h1{font-size:30px;}}
    </style>
</head>
<body>
<div class="system-message error">
<div class="image">
<img src="http://<?php echo $_SERVER['HTTP_HOST']?>/assets/images/success.svg" alt="" width="150" />
</div>
<h2>站点提示信息</h2>
</br>
<?php echo $msg; ?>
</div>
<div class="copyright">
<p>Copyright © <?php echo date("Y");?><a href="">幻影二级域名分发系统</a></p>
</body>
</html>
<?php
    if ($die == true) {
        exit;
    }
}
function loginmsg($msg = '温馨提示',$die = true) {
?>
<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>温馨提示</title>
        <link rel="icon" type="image/png" href="../favicon.ico">
        <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap">
        <link rel="stylesheet" href="../assets/css/style.tailwind.css">
    </head>
    <body>
        <div id="page-container" class="flex flex-col mx-auto w-full min-h-screen min-w-80 bg-white text-gray-800">
            <header id="page-header" class="flex flex-none items-center bg-white">
                <div class="flex-none container xl:max-w-6xl mx-auto p-8 text-center">
                    <a class="group inline-flex items-center space-x-1 font-bold text-lg text-gray-700" href="/">
                        <img src="../assets/images/logo.png" alt="ranyun logo" style="width: 150.8px; height: 100%;" draggable="false" onerror="onerror=null;src='/assets/indexNew/images/logo.png'">
                    </a>
                </div>
            </header>
            <main id="page-content" class="flex flex-auto flex-col max-w-full bg-white">
                <div class="overflow-hidden">
                    <div class="container xl:max-w-6xl mx-auto px-4 pt-20 pb-20 lg:px-8 md:pt-40 md:pb-40">
                        <div class="group relative">
                            <div class="hidden md:block absolute inset-0 -m-16 bg-indigo-100 rounded-3xl transform -rotate-3 translate-y-2 scale-105 transition ease-out duration-500 group-hover:-rotate-2">
                            </div>
                            <div class="hidden md:block absolute inset-0 -m-16 bg-brand-100 rounded-3xl transform rotate-3 translate-y-2 scale-105 transition ease-out duration-500 group-hover:rotate-2">
                            </div>
                            <div class="hidden md:block absolute inset-0 -m-16 bg-white rounded-md shadow-subtle">
                            </div>
                            <div class="flex flex-col md:flex-row items-center space-y-8 md:space-y-0 md:space-x-6 relative">
                                <div class="text-center lg:w-1/2 space-y-8">
                                    <div>
                                    <svg class="fa-duo fa-envelope-open-text inline-block" fill="currentColor" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4711" width="200" height="200">
                                        <path d="M511.823 67c-208.215-0.153-388.629 144.437-434.067 347.878-45.438 203.44 56.28 411.195 244.73 499.847 188.45 88.653 413.113 34.439 540.528-130.437 8.397-14.92 4.693-33.74-8.73-44.355-13.423-10.615-32.567-9.863-45.119 1.77-116.842 150.752-328.252 189.361-490.73 89.622-162.48-99.738-224-305.889-142.805-478.522 81.195-172.632 279.108-256.47 459.4-194.604 180.293 61.865 285.234 249.623 243.593 435.828a34.8 34.8 0 0 0 8.073 35.292 34.7 34.7 0 0 0 35.034 8.973 34.756 34.756 0 0 0 24.01-27.075c26.5-115.522 5.789-236.857-57.529-337.01C824.893 174.054 724.222 103.391 608.596 77.94A428.763 428.763 0 0 0 511.823 67z" fill="#FD6B6D" p-id="4712">
                                            </path>
                                            <path d="M388.923 332.562l125.04 129.283 129.113-124.25c14.13-13.597 36.595-13.205 50.24 0.877 13.586 14.02 13.234 36.397-0.785 49.982l-0.088 0.085L563.28 512.836l124.996 129.236c13.633 14.095 13.258 36.573-0.837 50.206l-0.04 0.039c-14.145 13.638-36.663 13.245-50.323-0.879L512.034 562.154l-129.11 124.25c-14.13 13.598-36.595 13.206-50.24-0.876-13.586-14.02-13.234-36.397 0.785-49.982l0.088-0.085 129.16-124.298-124.994-129.235c-13.633-14.095-13.258-36.573 0.837-50.206l0.04-0.039c14.145-13.638 36.663-13.245 50.323 0.879z" fill="#FD6B6D" p-id="4713">
                                            </path>
                                        </svg>
                                    </div>
                                </div>
                                <div class="lg:w-1/2">
                                    <h1 class="text-2xl lg:text-3xl lg:leading-10 font-bold mb-3">
                                        请先登陆后在进行操作~
                                    </h1>
                                    <h4 class="text-1xl lg:text-1xl lg:leading-10 mb-3">
                                        页面将在 <span id="wait">3</span> 秒后进行自动跳转
                                    </h4>
                                    <div class="space-x-1 sm:space-x-2">
                                        <a href="#" onClick="javascript :history.back(-1);" class="inline-flex justify-center items-center space-x-2 rounded border font-medium focus:outline-none px-4 py-2 leading-6 border-opacity-10 bg-red-100 text-red-700 hover:bg-gray-900 hover:text-red-500 active:bg-red-100 active:text-red-700">
                                            <svg t="1627550234650" class="hi-solid hi-briefcase inline-block w-5 h-5 opacity-60" fill="currentColor" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2135">
                                                <path d="M834.77 351.69c-58.72-58.72-136.84-91.07-219.86-91.07H262.82l52.66-45.16c18.61-15.94 20.7-43.93 4.76-62.5-15.94-18.61-43.93-20.74-62.47-4.8L114.15 271.3c-0.53 0.46-1.01 0.96-1.52 1.44-0.41 0.39-0.83 0.76-1.22 1.16-0.64 0.65-1.23 1.33-1.83 2.01-0.37 0.42-0.74 0.84-1.09 1.28-0.55 0.68-1.06 1.39-1.57 2.1-0.35 0.49-0.7 0.99-1.03 1.5-0.45 0.69-0.87 1.39-1.28 2.1-0.34 0.58-0.66 1.17-0.97 1.77-0.35 0.68-0.68 1.37-1 2.08-0.3 0.66-0.57 1.32-0.84 1.99-0.28 0.7-0.54 1.41-0.78 2.12-0.22 0.67-0.43 1.35-0.62 2.04-0.22 0.78-0.42 1.55-0.6 2.34-0.13 0.6-0.25 1.21-0.36 1.83-0.17 0.93-0.32 1.86-0.43 2.8-0.05 0.45-0.09 0.9-0.13 1.36-0.06 0.68-0.16 1.35-0.19 2.04-0.12 3.49 0.18 6.94 0.85 10.31 0.04 0.19 0.07 0.38 0.11 0.57 0.25 1.17 0.55 2.33 0.89 3.48 0.1 0.32 0.19 0.64 0.3 0.96 0.34 1.04 0.71 2.06 1.12 3.07a41.462 41.462 0 0 0 1.83 3.95c0.18 0.35 0.37 0.69 0.57 1.03 0.53 0.94 1.08 1.86 1.67 2.76 0.19 0.29 0.39 0.57 0.59 0.86 0.64 0.92 1.3 1.82 2.01 2.69 0.18 0.22 0.37 0.43 0.55 0.64 0.69 0.82 1.42 1.62 2.17 2.39 0.15 0.15 0.29 0.31 0.44 0.46l143.48 143.44c8.66 8.66 19.98 12.98 31.31 12.98 11.33 0 22.72-4.33 31.38-12.98 17.24-17.31 17.24-45.37-0.07-62.68L250 349.28h364.86c59.37 0 115.2 23.12 157.18 65.1 42.05 42.02 65.21 97.85 65.21 157.25 0 122.63-99.83 222.42-222.46 222.46H266.07c-24.45 0-44.29 19.84-44.29 44.33s19.84 44.33 44.29 44.33h348.84c171.46-0.04 310.97-139.61 310.97-311.11 0-83.08-32.32-161.2-91.11-219.95z" p-id="2136">
                                                </path>
                                            </svg>
                                            <span>返回上一页</span>
                                        </a>
                                        <a id="href" href="/admin/login.php" class="inline-flex justify-center items-center space-x-2 rounded border font-medium focus:outline-none px-4 py-2 leading-6 border-gray-200 bg-gray-200 text-gray-700 hover:text-gray-700 hover:bg-gray-300 hover:border-gray-300 focus:ring focus:ring-gray-500 focus:ring-opacity-50 active:bg-gray-200 active:border-gray-200">
                                            <svg t="1627203648027" class="hi-solid hi-home inline-block w-5 h-5 opacity-60" fill="currentColor" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg">
                                                <path d="M755.072 545.472L583.424 717.12a32 32 0 0 0 45.248 45.248l226.304-226.272a31.904 31.904 0 0 0 0-45.248L628.672 264.576a32 32 0 0 0-45.248 45.248l171.648 171.648H213.344a32 32 0 0 0 0 64h541.76z" p-id="4179"></path>
                                            </svg>
                                            <span>立即跳转</span>
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </main>
            <footer id="page-footer">
                <div class="container xl:max-w-6xl mx-auto p-4 lg:p-8">
                    <div class="flex flex-col items-center justify-between">
                        <div class="text-sm md:text-center">
                            <strong>Copyright © <?=$title;?> </strong> &copy; <?php echo date("Y");?>
                        </div>
                    </div>
                </div>
            </footer>
        </div>
        <script>
            (function(){
                var wait = document.getElementById("wait"),
                    href = document.getElementById("href").href;
                var interval = setInterval(function(){
                    var time = --wait.innerHTML;
                    if(time <= 0) {
                        location.href = href;
                        clearInterval(interval);
                    };
                }, 1000);
            })();
        </script>
    </body>
</html>
<?php
    if ($die == true) {
        exit;
    }
}
function loginsmsg($msg = '温馨提示',$die = true) {
?>
<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>温馨提示</title>
        <link rel="icon" type="image/png" href="../favicon.ico">
        <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap">
        <link rel="stylesheet" href="../assets/css/style.tailwind.css">
    </head>
    <body>
        <div id="page-container" class="flex flex-col mx-auto w-full min-h-screen min-w-80 bg-white text-gray-800">
            <header id="page-header" class="flex flex-none items-center bg-white">
                <div class="flex-none container xl:max-w-6xl mx-auto p-8 text-center">
                    <a class="group inline-flex items-center space-x-1 font-bold text-lg text-gray-700" href="/">
                        <img src="../assets/images/logo.png" alt="ranyun logo" style="width: 150.8px; height: 100%;" draggable="false" onerror="onerror=null;src='/assets/indexNew/images/logo.png'">
                    </a>
                </div>
            </header>
            <main id="page-content" class="flex flex-auto flex-col max-w-full bg-white">
                <div class="overflow-hidden">
                    <div class="container xl:max-w-6xl mx-auto px-4 pt-20 pb-20 lg:px-8 md:pt-40 md:pb-40">
                        <div class="group relative">
                            <div class="hidden md:block absolute inset-0 -m-16 bg-indigo-100 rounded-3xl transform -rotate-3 translate-y-2 scale-105 transition ease-out duration-500 group-hover:-rotate-2">
                            </div>
                            <div class="hidden md:block absolute inset-0 -m-16 bg-brand-100 rounded-3xl transform rotate-3 translate-y-2 scale-105 transition ease-out duration-500 group-hover:rotate-2">
                            </div>
                            <div class="hidden md:block absolute inset-0 -m-16 bg-white rounded-md shadow-subtle">
                            </div>
                            <div class="flex flex-col md:flex-row items-center space-y-8 md:space-y-0 md:space-x-6 relative">
                                <div class="text-center lg:w-1/2 space-y-8">
                                    <div>
                                    <svg class="fa-duo fa-envelope-open-text inline-block" fill="currentColor" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4711" width="200" height="200">
                                        <path d="M511.823 67c-208.215-0.153-388.629 144.437-434.067 347.878-45.438 203.44 56.28 411.195 244.73 499.847 188.45 88.653 413.113 34.439 540.528-130.437 8.397-14.92 4.693-33.74-8.73-44.355-13.423-10.615-32.567-9.863-45.119 1.77-116.842 150.752-328.252 189.361-490.73 89.622-162.48-99.738-224-305.889-142.805-478.522 81.195-172.632 279.108-256.47 459.4-194.604 180.293 61.865 285.234 249.623 243.593 435.828a34.8 34.8 0 0 0 8.073 35.292 34.7 34.7 0 0 0 35.034 8.973 34.756 34.756 0 0 0 24.01-27.075c26.5-115.522 5.789-236.857-57.529-337.01C824.893 174.054 724.222 103.391 608.596 77.94A428.763 428.763 0 0 0 511.823 67z" fill="#FD6B6D" p-id="4712">
                                            </path>
                                            <path d="M388.923 332.562l125.04 129.283 129.113-124.25c14.13-13.597 36.595-13.205 50.24 0.877 13.586 14.02 13.234 36.397-0.785 49.982l-0.088 0.085L563.28 512.836l124.996 129.236c13.633 14.095 13.258 36.573-0.837 50.206l-0.04 0.039c-14.145 13.638-36.663 13.245-50.323-0.879L512.034 562.154l-129.11 124.25c-14.13 13.598-36.595 13.206-50.24-0.876-13.586-14.02-13.234-36.397 0.785-49.982l0.088-0.085 129.16-124.298-124.994-129.235c-13.633-14.095-13.258-36.573 0.837-50.206l0.04-0.039c14.145-13.638 36.663-13.245 50.323 0.879z" fill="#FD6B6D" p-id="4713">
                                            </path>
                                        </svg>
                                    </div>
                                </div>
                                <div class="lg:w-1/2">
                                    <h1 class="text-2xl lg:text-3xl lg:leading-10 font-bold mb-3">
                                        请先登陆后在进行操作~
                                    </h1>
                                    <h4 class="text-1xl lg:text-1xl lg:leading-10 mb-3">
                                        页面将在 <span id="wait">3</span> 秒后进行自动跳转
                                    </h4>
                                    <div class="space-x-1 sm:space-x-2">
                                        <a href="#" onClick="javascript :history.back(-1);" class="inline-flex justify-center items-center space-x-2 rounded border font-medium focus:outline-none px-4 py-2 leading-6 border-opacity-10 bg-red-100 text-red-700 hover:bg-gray-900 hover:text-red-500 active:bg-red-100 active:text-red-700">
                                            <svg t="1627550234650" class="hi-solid hi-briefcase inline-block w-5 h-5 opacity-60" fill="currentColor" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2135">
                                                <path d="M834.77 351.69c-58.72-58.72-136.84-91.07-219.86-91.07H262.82l52.66-45.16c18.61-15.94 20.7-43.93 4.76-62.5-15.94-18.61-43.93-20.74-62.47-4.8L114.15 271.3c-0.53 0.46-1.01 0.96-1.52 1.44-0.41 0.39-0.83 0.76-1.22 1.16-0.64 0.65-1.23 1.33-1.83 2.01-0.37 0.42-0.74 0.84-1.09 1.28-0.55 0.68-1.06 1.39-1.57 2.1-0.35 0.49-0.7 0.99-1.03 1.5-0.45 0.69-0.87 1.39-1.28 2.1-0.34 0.58-0.66 1.17-0.97 1.77-0.35 0.68-0.68 1.37-1 2.08-0.3 0.66-0.57 1.32-0.84 1.99-0.28 0.7-0.54 1.41-0.78 2.12-0.22 0.67-0.43 1.35-0.62 2.04-0.22 0.78-0.42 1.55-0.6 2.34-0.13 0.6-0.25 1.21-0.36 1.83-0.17 0.93-0.32 1.86-0.43 2.8-0.05 0.45-0.09 0.9-0.13 1.36-0.06 0.68-0.16 1.35-0.19 2.04-0.12 3.49 0.18 6.94 0.85 10.31 0.04 0.19 0.07 0.38 0.11 0.57 0.25 1.17 0.55 2.33 0.89 3.48 0.1 0.32 0.19 0.64 0.3 0.96 0.34 1.04 0.71 2.06 1.12 3.07a41.462 41.462 0 0 0 1.83 3.95c0.18 0.35 0.37 0.69 0.57 1.03 0.53 0.94 1.08 1.86 1.67 2.76 0.19 0.29 0.39 0.57 0.59 0.86 0.64 0.92 1.3 1.82 2.01 2.69 0.18 0.22 0.37 0.43 0.55 0.64 0.69 0.82 1.42 1.62 2.17 2.39 0.15 0.15 0.29 0.31 0.44 0.46l143.48 143.44c8.66 8.66 19.98 12.98 31.31 12.98 11.33 0 22.72-4.33 31.38-12.98 17.24-17.31 17.24-45.37-0.07-62.68L250 349.28h364.86c59.37 0 115.2 23.12 157.18 65.1 42.05 42.02 65.21 97.85 65.21 157.25 0 122.63-99.83 222.42-222.46 222.46H266.07c-24.45 0-44.29 19.84-44.29 44.33s19.84 44.33 44.29 44.33h348.84c171.46-0.04 310.97-139.61 310.97-311.11 0-83.08-32.32-161.2-91.11-219.95z" p-id="2136">
                                                </path>
                                            </svg>
                                            <span>返回上一页</span>
                                        </a>
                                        <a id="href" href="/user/login.php" class="inline-flex justify-center items-center space-x-2 rounded border font-medium focus:outline-none px-4 py-2 leading-6 border-gray-200 bg-gray-200 text-gray-700 hover:text-gray-700 hover:bg-gray-300 hover:border-gray-300 focus:ring focus:ring-gray-500 focus:ring-opacity-50 active:bg-gray-200 active:border-gray-200">
                                            <svg t="1627203648027" class="hi-solid hi-home inline-block w-5 h-5 opacity-60" fill="currentColor" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg">
                                                <path d="M755.072 545.472L583.424 717.12a32 32 0 0 0 45.248 45.248l226.304-226.272a31.904 31.904 0 0 0 0-45.248L628.672 264.576a32 32 0 0 0-45.248 45.248l171.648 171.648H213.344a32 32 0 0 0 0 64h541.76z" p-id="4179"></path>
                                            </svg>
                                            <span>立即跳转</span>
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </main>
            <footer id="page-footer">
                <div class="container xl:max-w-6xl mx-auto p-4 lg:p-8">
                    <div class="flex flex-col items-center justify-between">
                        <div class="text-sm md:text-center">
                            <strong>Copyright © <?=$title;?> </strong> &copy; <?php echo date("Y");?>
                        </div>
                    </div>
                </div>
            </footer>
        </div>
        <script>
            (function(){
                var wait = document.getElementById("wait"),
                    href = document.getElementById("href").href;
                var interval = setInterval(function(){
                    var time = --wait.innerHTML;
                    if(time <= 0) {
                        location.href = href;
                        clearInterval(interval);
                    };
                }, 1000);
            })();
        </script>
    </body>
</html>
<?php
    if ($die == true) {
        exit;
    }
}
function MkEncrypt($password, $pageid = 'default', $conf = array()) {
    $pageid = md5($pageid);
    $md5pw = md5(md5($password).MK_ENCRYPT_SALT);
    $postpwd = isset($_POST['pagepwd']) ? trim($_POST['pagepwd']) : '';
    $cookiepwd = isset($_COOKIE['mk_encrypt_'.$pageid]) ? trim($_COOKIE['mk_encrypt_'.$pageid]) : '';

    if($cookiepwd == $md5pw) {
        return; // Cookie密码验证正确
    }

    if($postpwd == $password) { // 提交的密码正确
        setcookie('mk_encrypt_' . $pageid, $md5pw, time() + $conf['safedate'], '/');
        return;
    }

    ?>
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
        <meta charset="UTF-8"> 
        <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
        <meta name="renderer" content="webkit"> 
        <meta name="author" content="mengkun">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
        <title>请输入安全登录口令</title>
        <link rel="icon" href="../../assets/images/favicon.ico" type="image/ico">
        <meta name="author" content="xiaoxiao">
        <link rel="stylesheet" href="../assets/libs/layui/css/layui.css"/>
        <link rel="stylesheet" href="../assets/module/admin.css?v=318">
    </head>
    <body>
        <style>
            body {
                background: linear-gradient(to right, #E5EDEC, #E5EDEC);
                font-family: 微软雅黑
            }
            .site-content {
                margin: 0 20%;
                width: 60%;
            }
            @media (max-width: 769px) {
                .site-content {
                    margin: 0;
                    width: 100%;
                }
            }
        </style>

        <div class="container-fluid site-content" style="padding-top:10px;">
            <div class="layui-fluid">
                <div class="layui-card">
                    <div class="layui-card-header">安全防护页面</div>
                    <div class="layui-card-body">
                        <center>
                            <svg class="alert" viewBox="0 0 1084 1024" xmlns="http://www.w3.org/2000/svg" width="80" height="80">
                                <defs><style/></defs>
                                <path d="M1060.744 895.036L590.547 80.656a55.959 55.959 0 0 0-96.919 0L22.588 896.662a55.959 55.959 0 0 0 48.43 83.907h942.14a55.959 55.959 0 0 0 47.525-85.534zm-470.619-85.172a48.008 48.008 0 1 1-96.015 0v-1.567a48.008 48.008 0 1 1 96.015 0v1.567zm0-175.345a48.008 48.008 0 1 1-96.015 0V379.362a48.008 48.008 0 1 1 96.015 0v255.157z" fill="#FF9800"/>
                            </svg>
                        </center>
                        <form action="" method="post">
                            <div class="layui-form-item">
                                <label class="layui-form-label layui-form-required">安全口令</label>
                                <div class="layui-input-block">
                                    <input type="password" name="pagepwd" class="layui-input" placeholder="请输入安全口令校验码" required>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <button type="submit" class="layui-btn">&emsp;提交&emsp;</button>
                                <a type="button" class="layui-btn layui-btn-primary" href="../">&emsp;离开&emsp;</a>
                            </div>

                            <?php if($postpwd): ?>
                            <p id="pw-error">不是你的别乱登!口令不对哦~</p>
                            <script>setTimeout(function() {document.getElementById("pw-error").style.display = "none"}, 2000);</script>
                            <?php endif; ?>
                        </form>
                    </div>
                </div>
            </div>
        </div>

        <!-- js部分 -->
        <script type="text/javascript" src="../assets/libs/layui/layui.js"></script>
        <script type="text/javascript" src="../assets/js/common.js?v=318"></script>
        <script>
            layui.use(['layer', 'form'], function () {
                var $ = layui.jquery;
                var layer = layui.layer;
                var form = layui.form;
            });
        </script>
    </body>
    </html>
    <?php
    exit();
}
function emailmsg($email, $die = true) {
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>正在进行邮件激活操作</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link href="../favicon.ico" rel="icon">
    <link rel="stylesheet" href="../assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="../assets/module/admin.css?v=318">
    <style type="text/css">
    html{height:100%}.login-wrapper{max-width:420px;padding:20px;margin:0 auto;position:relative;box-sizing:border-box;z-index:2}.login-wrapper>.layui-form{padding:25px 30px;background-color:#fff;box-shadow:0 3px 6px -1px rgba(0,0,0,.19);box-sizing:border-box;border-radius:4px}.login-wrapper>.layui-form>h2{color:#333;font-size:18px;text-align:center;margin-bottom:25px}.login-wrapper>.layui-form>.layui-form-item{margin-bottom:25px;position:relative}.login-wrapper>.layui-form>.layui-form-item:last-child{margin-bottom:0}.login-wrapper>.layui-form>.layui-form-item>.layui-input{height:40px;line-height:1.5;border-radius:4px!important}.login-wrapper .layui-input-icon-group>.layui-input{padding-left:40px}.login-wrapper .layui-input-icon-group>.layui-icon{width:40px;height:40px;line-height:40px;font-size:18px;color:#909399;position:absolute;left:0;top:0;text-align:center}.login-wrapper>.layui-form>.layui-form-item.login-captcha-group{padding-right:135px}.login-wrapper>.layui-form>.layui-form-item.login-captcha-group>.login-captcha{height:46px;width:120px;cursor:pointer;box-sizing:border-box;border:1px solid #e6e6e6;border-radius:4px!important;position:absolute;right:0;top:0}.login-wrapper>.layui-form>.layui-form-item>.layui-form-checkbox{margin:0!important;padding-left:25px}.login-wrapper>.layui-form>.layui-form-item>.layui-form-checkbox>.layui-icon{width:15px!important;height:15px!important}.login-wrapper>.layui-form .sf,.login-wrapper>.layui-form .sf2{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;user-select:none;height:40px;padding:0 15px;font-size:16px;transition:color .2s linear,background-color .2s linear,border .2s linear,box-shadow .2s linear;color:#fff;line-height:1.5;border-radius:4px!important;background-color:#2d8cf0;border-color:#2d8cf0}.login-wrapper>.layui-form .sf2{color:#000;background-color:#fff;border-color:#dcdee2}.login-wrapper>.layui-form>.layui-form-item.login-oauth-group>a>.layui-icon{font-size:26px}@media screen and (min-height:550px){.login-wrapper{margin:-250px auto 0;position:absolute;top:50%;left:0;right:0;width:100%}}.layui-btn{background-color:#5fb878;border-color:#5fb878}.layui-link{color:#5fb878!important}.layer-get-code>p{color:#666;font-size:16px}.layer-get-code>.lay-code-group>.layui-input{border-radius:0;height:46px;line-height:46px;background-color:transparent;border-color:rgba(111,121,122,.3)}.layer-get-code>.lay-code-group>img{position:absolute;right:0;top:0;height:46px;width:120px;box-sizing:border-box;cursor:pointer}.logo{width:60px!important;margin-top:10px!important;margin-bottom:10px!important;margin-left:20px!important}.desc,.title{height:60px!important;line-height:60px!important}.title{font-size:30px!important;font-weight:550!important;margin-left:20px!important;color:#3492ed!important;display:inline-block!important;margin-top:10px!important;position:absolute!important}.desc{width:100%!important;text-align:center!important;color:gray!important}.page-account-other{margin:24px 0;text-align:left}.page-account-other img{width:24px;margin-left:16px;cursor:pointer;vertical-align:middle;opacity:.7;transition:all .2s ease-in-out}.imgbj,.imgc{width:auto;height:auto;top:0;left:0;z-index:-1;position:fixed;background-size:cover}.imgc{background-size:100% 100%;background-repeat:repeat;width:100%;height:100%}
    </style>
</head>
<div class="imgc"></div>
<img class="imgbj" src="../assets/images/background.svg">
<div class="login-wrapper layui-anim layui-anim-scale layui-hide">
    <form class="layui-form layui-card-body" id="divLoading" style="padding: 28px 15px;box-sizing: border-box;min-height: 126px;opacity: 0.95">
        <div class="layui-form-item">
            <img class="logo" src="../assets/images/favicon.ico" />
            <div class="title">State Email</div>
            <div class="desc">
               二 级 域 名 分 发 系 统 用 户 邮 件 激 活
            </div>
        </div>
        <input type="hidden" name="email" value="<?=$email;?>"/>
        <div class="layui-form-item layui-input-icon-group login-captcha-group">
            <i class="layui-icon layui-icon-auz"></i>
            <input type="text" class="layui-input" name="code" placeholder="请输入验证码" autocomplete="off" lay-verType="tips">
			<button class="layui-btn layui-btn-primary layui-border login-captcha" lay-filter="email_send" type="button" lay-submit>立即发送</button>
        </div>
        <div class="layui-form-item">
            <button class="layui-btn layui-btn-fluid" lay-filter="email_btn" type="button" lay-submit>激活</button>
        </div>
    </form>
</div>
<script type="text/javascript" src="../assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="../assets/js/common.js?v=318"></script>
<script type="text/javascript">
    layui.use(['jquery', 'layer', 'form', 'admin', 'notice', 'element'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        var admin = layui.admin;
        var notice = layui.notice;
        var element = layui.element;
        $('.login-wrapper').removeClass('layui-hide');
        
        form.on('submit(email_send)', function (data) {
        	var email = $("input[name='email']").val();
        	notice.msg('正在发送验证码..', {icon: 4, close: true});
        	$.ajax({
        		type: "POST",
        		url: "../ajax.php?act=email_send",
        		data: {
        			"email": email
        		},
        		dataType: 'json',
        		success: function(data) {
        			notice.destroy();
        			if (data.code == 0) {
            			    notice.success({
            			    title: '消息通知',
                            message: data.msg,
                    		position: 'topCenter',
                    		audio: ''
                		});
        			} else {
        				notice.error({
                            title: '消息通知',
                            message: data.msg,
                            position:'topCenter',
                            audio:''
                        });
        			}
        		}
        	});
        });
        
        form.on('submit(email_btn)', function (data) {
        	var email = $("input[name='email']").val();
        	var code = $("input[name='code']").val();
        	if (!code) {
        		notice.msg('验证码不能为空！', {icon: 2, close: true});
                return;
        	}
        	notice.msg('正在激活中..', {icon: 4, close: true});
        	$.ajax({
        		type: "POST",
        		url: "../ajax.php?act=email_btn",
        		data: {
        			"email": email,
        			"code": code
        		},
        		dataType: 'json',
        		success: function(data) {
        			notice.destroy();
        			if (data.code == 0) {
            			    notice.success({
            			    title: '消息通知',
                            message: data.msg,
                    		position: 'topCenter',
                    		audio: ''
                		});
        			    setTimeout(function() {
                		    window.location.href = "./";
            		    }, 1500); // 1.5秒后跳转
        			} else {
        				notice.error({
                            title: '消息通知',
                            message: data.msg,
                            position:'topCenter',
                            audio:''
                        });
        			}
        		}
        	});
        });
        
    });
</script>
</body>
</html>
<?php
    if ($die == true) {
        exit;
    }
}